clean up and simplify test helpers