Major Tidy up of code

Created run_analysis function

Used a procedural format for the code, passing the entire data.frame
around.
Hopefully easy to read.
Adding to codebook