Clean up code and make improvements to follow Kotlin best practices.

*** ** * ** ***

    Refactor the Kotlin code below to be more idiomatic, efficient, and readable. Focus on
    using Kotlin's features like extension functions, data classes, sealed classes, and
    coroutines where appropriate. Explain the changes you made and why they improve the
    code. Also, suggest potential performance optimizations.

    $CURRENT_FILE

| To run this prompt in Android Studio, click **Gemini** in the sidebar and paste it in the chat field.   
| To save and retrieve prompts in the Studio IDE, go to **Settings \> Gemini \> Prompt Library**.

*** ** * ** ***