Updated javascript and html based on PR comments