Switched to factory rather than rootScope