fixed syntax errors, renamed variables, clean up for run_analysis.R