flatten.ml

Updates. This version compiles, but I have not yet been able to
successfully test it