Improved line accuracy while drawing.
Added a dot if the user clicks without dragging a line.
Fixed other line-related bugs.