Added a bunch of error checking in the low-level wrapper.
Updated todos in readme.