Simplify some of the existing implementations and share the code between the different maps.