Included Code.R to hold functions.

In order to keep the R Markdown to a manageable size functions are moved
to a library routine