Added explicit params for some codgen functions in cgen
Breaking a few functions into more function in cgen