Refactored the passing of a data source.