Refactorize updater.