Refactoring JSON Calls