Stylistic refactor of custom MM helpers.

Avoid chaining more methods after an end like this:

    array.map do |item|
      # ...
    end.uniq