Refactored everything i could except that iir_gauss part