Fix variable naming issue. Fix formatting a bit.
Merge pull request #2 from bgammill/master

Fix a few issues