Refactored to add data fetching functions into the baton API.