Major rework of map data structure, and added prelim double buffering