Implemented logic for detecting cross-links
Better variable name
Extra unit tests and extra constructor for Line