Cleaned up the display code

Pulled some of the display code out into separate methods.