Moved structs to top of file