Removed requests to API and made them database queries