Fixed the MapTexture color format and made some minor fixes to main.cpp