Lots of small changes to prettyprinter