Nicer interface between PK and debug.

Finally get rid of pk_context.type member, too.
5 files changed