Refactor mapper