Moved Listener to main class