improved texture loading and management