What is Refactoring? Cleaning up code is important.
The page defines refactoring as changing software structure to make code easier to understand and modify without changing observable behavior, and says tests help check that refactoring did not alter behavior.