Main script section added.
Merge conflicts resolved.