Extracting a mixin that contains the common logic for related fields.