Refactoring service definition validations