Simplify map algorithm.