Comment documentation improved for main functions