Added remote API call and refactored service