A bit of refactoring in Texture class.