code clean up: unused variables
code clean up: tiny optimization
Merge remote-tracking branch 'upstream/master' into editors-fix
Merge remote-tracking branch 'upstream/master' into editors-fix
Merge remote-tracking branch 'upstream/master' into editors-fix
code clean up
Merge pull request #6 from seb777/editors-fix

Code clean up and tiny optimizations from seb777.

- Remove unused variables.
- Move variable declarations to the inner code block where they are needed.