Fixed Collision Detection, refactoring