Some linear algebra using lists - mostly replaced by implementations using Vectors, but a few functions remained useful