more tests and tweaks