Added collision function plus environment classes.

The inheritance doesn't seem to be working, and won't compile. Please
investigate.