Some tests and tweaks