Add main listener and move the first listener content into it.