A small refactoring + improved documentation