Externalize scripts