Refactor update process