Improve queue script.
Add facts derived to table.