Renamed initializeScanner in connect