Added javascript stuff as a separate JS file.