set some config options. moved js scripts to out of html.