Refactored jacobi function. Added def value constructor to matrix.