Removed Session struct and cleaned up waitForConnections method