Some work on line intersection. Can ignore this.