fixes issue #114: move JS in index.html to separate file