added some glue and some other stuff for wsgi