Script constructor modified