Move groups to a separate controller
Move all the group management into an angular service