Refactoring
Modify to use Texture interface