Docs, refactoring