This is mostly scaffolding, but is just about enough for pointers to classes to work properly as types.