Refactored a bit Texture class