Update flag and template models to use base model