add CC1/2 calculation, refactor the way R-factors are calculated. minor changes to swig interface file