New script and lots of tweaks