Moving JS to file, adding header