reorder templates
split out handlers