Various fixes
Merge pull request #14 from HasStacey/master

Various fixes