Added doc block
Refactored listener