Bug fixes to newremy; and pretty-printing