Moving listeners from client to server