Updated script and corrections