Commented etoh.R code. Broke out code to functions.