Updated the CR to be more strict about template cleanup. Removed Trim calls
and substituted the cleanup for removing starting "/" and "~/" prefixes and
"/" suffix from the combined template.