Added port system.
Correction of documentation.
Reordered code in main scheduler function.