Update reference to flag, merge dupe flag.
Update flag reference.
Reduce need for template.