Fixed bug with smoothing routine. Both smoothing_factor and step_size were ints so the adjusted smoothing factor was often zero if the original smoothing factor was 1