Refactoring bottle and nginx_uwsgi