Fixed the orthogonalization to work with inner rings.
Made it so that visibility of layers and attributes is save/loaded to/from the map.
Fixed a problem where if there were no changes made to attributes the save would fail.