Saner approach per kborcher's feedback. And tests.