R code cleanup.