Added mapsaving (no loading yet) for SP, fixed bugs