Modified the index view to use template