Refactor get_template_names on views