Refactoring disconnect delegate to a method.