Adding trait support to the class element