Simplify start up scripts.

Pack all the run logic into main.