Refactoring and update of documentation