#527 Encounter templates

Please review, but do not merge yet since some cleanup is needed