Repack and recombine.  Fix some variable scoping and other issued detected by the packer.