Merge pull request #49 from amalloy/master

Some fixes, and a feature
Inc version.
Add some typehints