Factor out common bean defs.