Privatize createConnection method