Refactoring is not rewriting …

Rewriting code is throwing away old code, it is not improving it. Rewriting code is hard, because starting a complex system from scratch often fails, because complex systems have to evolve from simple systems over time.

In most of the cases you want to keep your code base and improve it step by step using refactoring - this is your low risk scenario.

Refactoring is not porting code either, but that’s another story …