Added templates and created a flag detail view.