Remove some unnecessary stuff and use defines for the smoothing