support for path loading and better template handling