CHANGE: Refactored index.xhtml and template.xhtml