Update: move structs defs to top