Fix root path redirection.
Fix some derps in the code that make it breaking when used.

Also removed some old unused code from the backport.
Body POST data changed property location on the new Flight version.

Also fix a namespace usage.