Extracted datasource and delegate into new class