Refactoring + doc.