Some refactoring for lines and arrows.