Changed plots to ggplot. Cleaned up code a bit.