Refactor; use .NET classes where possible

`::UrlDecode(xxx)` will take care of `%20 -> <space>`. Not sure whether that's what you mean.