Removing duplicate ExtractIDs function