Cleanup and added callback to texture loading.