just more cleanup, plus more tests and some layout experiments