Updated to store script in js file instead of pom