Clan-up, bug fixes and new tests that need doing before I can refactor things to use TimeSources