Hello,
I have tried cosmetic_changes.py on some wikis, but it seems to be failing at removing subsequent empty sections. It only removes first empty section. Please see here for example.
I hope this ticket is not a duplicate from a similar issue. ;-)
Thanks!