Refactored out the InstructionMapper into a generic Mapper class