Refactor GetLine (more).