Allow roles to be specified for agents involved in events
Also refactor code - e.g. reduce duplication, don't compile templates unless template is required
Resolves uq-eresearch/AustESE#165
Tidy up - add missing semi-colons etc
Change typists to amanuenses