Refactor Karatext