many improvements
-rwxr-xr-x 9367 test.py
-rwxr-xr-x 8354 webapp.py