Necessary texture loading code (courtesy of mattdesl and Matthius Mann) sorted out