remove old wsgi functions, and last porting fixes