Modified DataManager to use less code and allow for arbitrary DataSources.