Update WSGI functions to take necessary arguments