Put all listeners into conditional blocks in main class