Refactor OutputLine into separate class