Move logic out of UI into a new class KaimuApp