added a few extra convenience API methods and more infrastructure for nesting and composition