Add JSON file and refactoring