refactor remapper into its own module