removed $broadcast and $on events in order to make the controller testable