Added a smoothing option and a quick plot