Minor changes
1)removed path length from Traverse function parameters
2)Added removeDuplicate method
3)Collapsable fuction incomplete