QueryMapper parses query strings including nested params

Got the fix from #337 but refactored and more tested