Moved listener to constructor.