several local iwdg function made static. This allows better optimization
and smamller code size