Refactoring and rationalization