Fix bindings

I have attempted to rebase @colinbate's PRs and as far as I can tell things work fine, please let me know if there is something I missed.  Tests and lint are happy.

closes #17 
closes #18