Looked a bit more into the code. For something like this, I suggest you extract out a `state` object that contains all the state as its properties. The `state` object is passed in as an argument to all functions in `modeInit` and `modeCompleted`. This way you can move `modeCompleted` and `modeInit` out without decoupling local states, and still make the actual `findSymbols` logic readable.

A second suggestion is that instead of `modeInit` and `modeCompleted`, do something like:

```
var findSymbolModes = {
   section: {
      init: function(state) {
        ...
      },
      isComplete: function(state) {
      }
   },
   method: {
      ...
   }
};
```

Whether `init` is called would be conditional on if the mode has an `init` property.

When you have a slough of variables like this that may or may not be temporary variables, local state, or constants, it's always better to extract out explicit state.