Fix unicode bug web.py + some cleanup