Finally working. Amended HTML and JS files