Refactoring and adding a CNF printer.