Rearranged some things so that I can use R's devtool package to load R code easily.