Refactor the tutorial code. Define the tutorial content in a JSON file.