changed a lot of functionality in json_functions

Now the two methods of pulling data (by basic search URL) and by date
range use different functions to get the JSON url, separated out into
different functions.

This makes the code more readable and makes more sense. One function
parses the search URL and converts it into a JSON url and the other
function uses a pre-determined json URL and appends the date filters