Add support for resource inheritance and templates