Cleaned up code and removed TEMP test file