Move struct definitions out from _PROTO macros, add _size accessor methods