Further work on lines.

Refactored code.  Moved lines to center of boxes, and behind boxes.
Updated tests.