Update route handling and URL generation, add WSGI support.