lines, user handling, refactoring