Cleanup and test cases.