Tidy up of code for print