code to generate domains and small tweaks, jquery made local