Each phase is now O(s) and overall we're at O(s^2). Added explanatory...
... comments.