In a software development context, provide a thorough explanation of what software refactoring entails, citing examples of when it is needed, outlining techniques used, and discussing how it fits into the overall software development process. Be sure to clearly communicate the benefits of software refactoring and common pitfalls to avoid.
This prompt doesn't seem malicious.