Tidy up some parts of the codebase.
Genericize data used for data source tests.
Check result data in tests.
Include data source tests for query and initialization.