Add StrToInt and FactorialTemplate function