More work done on loading textures. Need to fix segfault that occures in png loading.