* Fix tests code to prevent some runtime errors * Reduce nesting
* Unit tests and remove unused functions in models/notification * Read -> Unread