consolidated initial data cleaning and changed plotting to ggplot