Tony: clean up test code