Completed code module

cp1.R is the complete code for the project, plus two with useful code
not included in the final product