Added new provider populate_pseudo_entity function and removed old replace_entity function