Merge pull request #15 from APMG/master

Misc fixes