Update query string from view states
Fix indent