Suite of tests, fixes/refactoring exposed as required by those tests