Cleaned up the test code