The process of modifying the code structure, without modifying its current behavior, is called Refactoring.
Refactoring is a method that search to improve the code quality of a program.
The fundamental goals of refactoring are the improvement of system structure and the avoidance of code duplication. (Remarks from me, to a point)
Because any change could actually modify the behavior of the program, it is safest to do when unit tests are in place.
A refactoring operation is a sequence of simple edits that transforms a program's code but keeps it in a state where it compiles and runs correctly.
The suppression of code smells is one usage of refactoring.
See Relational Data Modeling - Refactoring
Javascript + HTML. See https://qunitjs.com/intro/