Refactored TextureManager.