Rewriting cleanup functions for libsmack test cases