Refactor mapping section