waterfall: ^Csample data to avoid memory errors
fix persistence broken by x data change
Merge pull request #100 from wardi/fix-memory-errors

Fix memory errors due to large image and history buffer