Sorted variable declarations, readded unread to query, changed more print messages to debug