Cleanup and testcase