Various changes to hardware test code