Idiomatic updates to python c bindings
Also potential fix for the corrupted memory
Merge pull request #3 from grierj/master

Idiomatic updates to python c bindings