Merge pull request #91 from jfly/master

Fix for #73 + some misc stuff