Additional tests; quality cleanup