Use new view registry API

This fixes some new deprecation warnings. Also gave NotificationElement an `::initialize` method so you can instantiate one with a model in a single line.
Oh sorry. Just to simplify the API; you just give it whatever function you want that returns a view.