Refactor Datasource.