a little cleanup wgml code