Remove some debug, add type hints, store UIDs with messages in context stacks