big refactor to facilitate inbox queues

+ a few random improvements

Existing documentation is now incorrect. Fixing soon.