Added some save map code
Added warnings
Fixed some things so that it compiles