Continue on smoothing code.
Add linear correction.
Improve module.
Make it more robust.
Add tests.
Improve module again.