Small documentation changes and refactoring