Merge pull request #9 from Zearin/develop

Assorted tweaks to code