Merge to commit 29 of PiStuffing Qc

Major code restructuration