TGA Loader testing and refactoring