Elastic Path Interview Question

Refactoring task - had to explain my solution in 2nd technical interview.