refigured functions so bluetooth and spacebrew don't get called until after socket connection is made; removed commented-out code; set up so that it automatically starts scanning -- because there is a delay when the bluetooth function is called, it doesn't read the stateChange