Improved tests and printing