2-D Fitting implemented

After being unable to fork roesel/ice, I have simply copied and pasted
the code changes made by sneshyba into my code, as we are working
together