Clean up tests a bit
Add a common header for output functions.