Make line printing more regular
Fixed #61

This uncovered a couple serious bugs. Fixed now.