Moved Collision Detection out into a separate class.