Added missing braces to control statements. Braces errywhere please.
Refactoring: Removing unused imports.
Simplifying for-loops, where practical.
Merge pull request #204 from fragmer/master

Code quality improvement batch #1 (import cleanup, missing braces, for-loops)