Continued in progress refactoring of dock into aggregator class. Also move utilities out of test_dock.py into utilities_test.py as they are used in test_aggregator class too.