Obvious bug fix
Merge pull request #2 from brabbins/master

Bug fixes: removed the warning and code clean up