Docs and refactors