put global script into main(), remove obsolete stopme() call

Change-Id: Ib73400d2703d8dfcfebdfe87189718242631ad1a
Merge "put global script into main(), remove obsolete stopme() call"