Added JS to pages instead of external files