Refactoring. Connection selector.