Enhancements and unit tests

1. Moved to hash set and hash map from tree set and tree map because it does not make sense
   that the search nodes must be ordered which is a constraint imposed by tree set and tree map.
2. Added quickcheck property based tests.