Converted to use getJSON to update buttons asynchronously