Texture class refactoring