Pretty much functional now with quite reasonable test coverage.