Changed structs to classes