Refactor arch_ok