Modified index page and its javascript