adjustments to get Juergen's fitModel to work
additional functions ported + cmake changes for gsl