changed collision.{cc,h} so that Collision is no longer a class, just a function