cleanup and math test cases