Move a structure insde a function, because it is only used in the functin.