Used anonymous structs instead of globally defined ones

To prevent the need to specify them global for one time usage only