set a default value for prettify to make it tolerant of nils. this whole section needs refactoring