Refactor Map function.