Tweaks to script