adding conf.runScriptOnStart to run script on start;
clean up unnecessary code;