Refactor request processor plus improve add listener if pending

This would fix the merge conflict from when add listener if pending is merged in after the refactor of request processor