Added index page. fixed part of main program.