Various additions and changes to print and webpage generation code