fix lots of style issues
Merge pull request #121 from dalen/stylefixes

fix lots of style issues
don't modify variables
Merge branch 'stylefixes'

* stylefixes:
  don't modify variables