Integration of minimization algorithm in the efficient version of
composition.
It may still have problems with some compositions, however :/