Some cleaning up of fit script/function/config