Removes env and script commands