"Smaller or larger differences" indeed. There cannot be any standard implementation, and apart from a few exceptions (in particular FilteredNode where all subclasses use the same typing rules) identical implementations are pretty much accidental. Certain nodes have the same or very similar typing rules but are otherwise unrelated. I think it would be wrong to have them implement a shared trait just for the implementation. Maybe the handling of the flags could be simplified and factored out.