Some refactoring - made external data connector
More work on the aggregate data source