Transition LineCompareDemo to print a matrix; it is in a working state, but the code is very messy, and some tests fail.