Done setting up the listener method.
Merge pull request #2 from mownier/listener-setup

Done setting up the listener method.
Fixed conflicts.