refactor macroTargetsView to use util.each