Many changes, need to rewrite this comment.

* repaired minimalization algorithm
* re -> fa is broken dont now why. Unit tests failing on this conversion... Need to investigate.