refactor url encoded parsing and ParamHash
refine test on parameter parsing
add 2 comment notes
fix cookie parsing and update usages