Refactor typewriter logic into simple typewriter