More fun with mapping

No reduction in lines, but does remove some of the repetitive code.