Added notifications to the PW app plus some code refactoring

Spaces around bracing style. https://google-styleguide.googlecode.com/svn/trunk/javaguide.html