Fix indentation
Fix variable shadowing warnings
Fix several assigned but unused variable warnings

Only removes the warnings that have no impact on the code
Merge pull request #70 from mattr-/fix-warnings

Fix warnings