Added code to detect HCE availability (and minimal code to acts accordingly)