Global documentation update and refactoring