Some minor refactoring.

Also it's worth noting, I fixed a bug in the printer functions earlier; they were inverting printed characters on the topleft->bottomright axis.