changed stuff to work with WSGI for Google App Engine