Improved the qualit with a ref IR (dirac). Still some normalization issues
Refactored the main loop