Clean up and centralize loading logic for data sources.

Some minor clean up to help in writing future data sources.