This script instantly ungroups all the layers in your document, whatever complex layer structure it has.