Template: Added Template,before event so that manipulations can be done on the result set (eg cleanUnResolvedResultVars) just before the template gets run.
String: Fixed newline at the end of singleString output for Dominic.