Fixed crashing bug when a map failed to load/save.
Rewriting of the MapRenderer
Fixed #19