Merge pull request #1 from jkwatson/master

A few little cleanups in the code