Currently, remap rules are stored in different structures and looked up separately based on type (forward, reverse, etc.). It'd be better design and more maintainable to process (store, search) all rules in one structure and then use type to determine action.
A fundamental problem with our current implementation is that the order in remap.config is not honored. E.g. a map directive always takes precedence over any redirect directives (if both matches).