Refactor out loading of texture data