Moved data fetching to api service