Mapping refactor fix and clean up