Refactoring Texture class