cleaned up code
ready to merge into master
Merge pull request #6 from mammothbane/john

merge john's changes into master