add renderString, also allow getTemplate to be called synchronously