Fixed a lot of data structures