bug fixs

calling FromBytes with invalid objects now retuens an error insted of panicing
fixed HID as HKID or HCID confution and removed many type asertions