The identities should all be at the start, and features at the end, so we just prepend the identity on add_identity, and append features on add_feature