Fix #186 Close all notifications on exit

Including other clean-ups.