Added Jacobi functionality, more bn features - plus tests.