In progress update to run under uwsgi