Describe a time you had to work with a complex legacy codebase; how did you navigate the code, and what steps did you take to modernize it?