Tell me about a time when you had to refactor a significant portion of code that was poorly written or structured. What approach did you take and what was the outcome?

Behavioral