Fixed function names to match Google's R styleguide.
Refactored the iteration functions to remove references to CDH where not appropriate. Also corrected the nested terms function. Finally, glm function changed to lognormal response variable rather than Gamma distribution.