Added an option to factorize the Jacobian before storing it