Fix compilation problems and issues in PrettyPrint