Add self-cleaner to remove empty lists and nodes.