changed C-style struct declarations and typedefs with plain old C++ structs