Flatten ast class hierarchy.