JSON Responses and other edits.

Haven't changed query command.