Added support for loading remote templates