Expose Waterfall for unit testing.
Specs added to show stack overflow issue.