Docs and refactoring.