Really like how you frame refactoring as a learning exercise: solve it your own way first, then study and reshape a provided solution to truly understand it. Having each iteration captured in a Git repo with npm run stepX is a great way to make improvements measurable and reversible. It reminds me of experimenting in Solar Smash —small steps, clear feedback, better outcomes.
