Clean up & refactor

Define helpers: `BaseMap`, `Map`, and `BufferMap`