Major type overhaul for better abstraction of C types