remove some cruft and simplify unit test slightly