Removed some dangerous options from the cli app.
used slightly cleaner shim to C code.
Documentation updates.
Started work on the API and module structure.