Adding a few simple tests.
Refactored write-matrices.rkt to use records and immutable loops.