Simplified the script.