WIP: Refactor certificate agent and queue

Details to follow...
These are needed, but were only being defined when reading from `auth.json`.