Refactor of helper/map_utils.rb