Refactored lib.printer

lib.printer no longer is an ugly class, but rather a bunch of functions.
Tests and documentation is included/updated.