Fixed plotting of the result and adjusted the smoothening.