Correct calculating stack totals
Cleanup waterfall series
Fix the issue related to flag series (close #1974), cleanup Waterfall series, lint the code
Merge branch 'stacking-fixes'