Created Collision Detector class to handle all collisions