Added a number of new functions for improved printing.