Declare variables locally
- The `allSections` variable was leaking into the global scope, due to a
typo in the declaration.
- `dataProcessed` can be declared more narrowly within the callback.
to successfully call a function with parameters by setTimeout,
it needs to be a function that will be called by setTimeout internally.
this patch actually enables multiple tries for calling the setState function.