Avoid code duplication by using a NestedMixin class