Fixed Collision Detection System. More optimisations to be done.