Fixed issued requiring PWD to be this.
Added functionality to demonstrate subscribing to events.