Defects in and device properties of semi-insulating GaAs