Add typedefs for internal structs