Refactor AutoRestart logic