Start of the implementation of a generalized ptree
Will be backed out