Updated code for index page