Move script to an external file