Wifi on/off testcase and minor refinements.