minor clean up
Refactor params and queryParams, close #1441, close #1442