Added notifications to the PW app plus some code refactoring

Use TODO(your user name):