Rebase pull request #3

Rebasing pull request #3, and cleaning up merge conflicts due to whitespace errors. Let me know if anything seems wrong. Thanks!