Abstracting mutio out of the angular controller