js improvements + index page