Bugfix in the second qp.
Formulation 10 (alt. constraints on contacts) + cleanups.