fixed compilation warnings, adjusted README and docstring, extern "C"