math, modelling, blas/lapack, and other improvements