separate application javascript from index.html