Refactor default params assignment for search
Fix bugs in form params generation