consolidated class and functions

still working on the collision.  I can't seem to get it working within
collision function.