Refactoring consists of improving the internal structure of an existing program's source code, while preserving its external behavior.
Source: Agile Glossary