Assorted bug fixes
Merge pull request #5 from jonathankau/dev

Assorted bug fixes