Added main script

Added the main script.