Cleans up the test record adding code.