Several new structs and functions