Added ability to load templates synchronously.