Used #ifndef in header.txt
Factorise MRP
Factorize (and fix) gaussian weight computation