Map fixes

Change map class to use setters and getters to prevent OOB issues.

Also fix a map-breaking bug because I'm an idiot.