Clean up debugging code and test cases.