Updated to use the remove elements from the maps based on the current synchronization