Added extract_subkeys