Adds support for class precedence search for traits and some extra attributes.