Perform internal refactoring.