Added index page handling and some basic template formatting.