Small refactoring, documentation added
License and some examples added