Prepare data.js for persistence implementation.
Fix regressions.