Generalised collision resolution into the CollisionResolver class.
Tidied.