Refactoring JSON