added submodule
removed old irrelevant code

also some new code from the docs