Printers code refactoring and cleanup