Refactoring for sudo user.