Major cleanup/change to kernel and names of types.