More tests and other tweaks