Add map support

Add support for static and dynamic maps, along with some stylistic and flow improvements.