Moved the print parser to its own function