Small mods to Alex's edited script