Refactoring for ServiceConnection