splitting R code into files, changing readme