refactor/cleanup DerivedEntity