Trying to move script to external file