improved texture loading / refactoring