Added smoothness variable
Pushing x-axis midpoints to array and resorting in ascending numerical order