Some stability additions to the code
Merge pull request #37 from DentonA/master

Some stability additions to the code