Not sure I can without making it more complicated. The `$variants` and `$quantities` vars are used throughout this method and would otherwise have to be passed around.. What I can do is add comments on the 3 respective parts of what is going on. Would that help?