Script setup and run