Cleaned up a lot of test code