Ripped the calculation guts out of the decompose imf gui application. It's a working library now.