Complete rewrite of the BonneNuit system