Refactored to read from JSON file.