Describe a situation where you had to refactor legacy code to implement a cleaner design pattern at Vergent LMS. What was your approach?