Refactoring, adding texture class