Slimmed down the script.