refactored controller/service inheritance logic