Implement a basic mapper

Putting this up for review. I want to do some minor cleanup and do the inline documentation before merging this.