linemode refactoring.
line modes.