Extract fetchData into its own module