I added script which constructs bigdocument. I fixed some bugs script already committed