Sped up folding. Reformatted code.