Improved texture loading