Checking in version with no dependencies.
Refactored to use libcollections.