Added layer of abstraction for json retrieval so it can be mocked