html printer, and minor bugfixes