[v1.1] Restored message flags as read; cleaned up code