added typedefs (since C cannot directly declare structs without "struct" the way C++ can)