Changed structs, added a function.