Added ability to render templates from controllers.