pkg2 wip: use more custom types.