Script cleanup.

o Follow Windows batch file goto:eof convention.
o Simplify case statement to simple if.