Connection commands && refactoring