Modify html for js functions and add js file