Changed layout of index.html and js to accomodate changes by Edward