cleaned up js with js hint and html as well added more functionality