LU-factorization implementation changes