clean up app delegate by refactoring creating connector