Update CommonPrefix, and GetElements