Refactor ServiceHandler