some pretty major refactoring, enable support for setting notifications as read/unread