Added concept of groups to collision.  Added weak_ptr template class