Create class DataFetcher. Move fetchdata method into it.