fixing sd parsing
more error handling, cleanup and a dependency prune
lots of cleanup
better log and error handling
updates to cffi callbacks