Perform refactoring