Rewrite of startup script.