Encode URL param values.
Organize js a bit.