Save and load map class.

Untested yet. Also include some commentaries and one little optimization
of the Main class.