Various little improvements to tests