Refactoring template rendoring when only one template to render