Added URL encoding for request parameters to get over a bug.
Fixed some unit test issues.