Fix bugs. Calculate component and estimate.

The calculate components is now working well.
Estimation is ok.