Fixing LU implementation
Fixed LU factorization and added solving function