Added CollisionResolver and moved collision resolution code to there.