Refactored CreateConnection methods