Tidy benchmarks, rewrite flattening transformations, add balance and unbalance functions. Partial support for rebuilding data types.

Rebuilding data types with mixed inductive and non-inductive components makes the baby jebus cry.