Document documentation and refactoring