MMIO: Cleanup Mapping class by using templates instead of macros.