Add documentation and minor code-refactoring

Done, the link is done automatically