update factories with promises so that firebase service is not needed in controllers