changed dataType of ajax to json, not creating filter string if no checkbox checked, separated out repeated code