Stupid filter working and printing residuals.
Clean-up and documentation in stupid_filter.