Removes redundant map-based code and tests