(Refactor) Move Api calls to factory/service