Created scalar version of Ravi's mxn_nlce code. Began adding support for propagation of errors but needs to be fixed (need to work out theory of error propagation).