Added comments, improved whitespace and braces, and changed one constant
which changed in the paper since I first wrote this code.
Merge pull request #27 from bcoopers/master

Mostly commenting and whitespace cleanup