Split the script into a seperate js file