Fixing tests, deleting test files after use