Full comments and a bit of refactoring for SearchDictionary