Setting up request and listeners separately