Updated g and f functions to take parameters

Also cleaned up estimates for mu,sigma, initial CCPs