separated inlined javaScript into separate js file.