use more blas and cleanup