Added EntityHelperTrait to reduce code duplication.