Refactored data fetching