Cleaned up the testing code