In computer programming and software design, code refactoring is the process of restructuring existing computer code—changing the factoring—without changing its external behaviour. Refactoring is intended to improve the design, structure, and/or implementation of the software, while preserving its functionality.