Remove un-needed HttpEncodes. The query function does it.
Added remove query parameter function
Improved remove param function