Now extracts AD and HID in a less hacky manner