Working auto regresser with a caching matrix.
Mahalanobis and z-order error detection added. A number of bug fixes here and there.