Moved documentation inside functions