cleaned up and moved JS outside of index.html file
moved JS to it's own file