Merge of my changes to facilitate work on namespaces and roles