Fix input mapping

Moved all of the mappings into a loop