Add doc strings. Refactor naming of functions.
Add shutdown hook for removing the native libs.
Add more documentation.