adding base case for null
fixed searchWordByCount
Fixed searchForDepth, some refactoring depth methods