Moved all calculation code to the decompose_imf_lib.