More refactoring of printLine().