Work on Picard, use the correct Jacobian in residual calculation.
Fix small memory leaks.