Corrected some typos.
Added detailed description of how the cost function of the IMF is calculated.