Documentation; refactoring.