Revert "better implementation, Fixes #42 again"

This reverts commit ad0abcdf99a0bf97d4aa547eae23428c48e8b0ff.
Revert "copy array dirty handling to json, fixes #42"

This reverts commit 4bb623a00726bc1fa16659f8085373ef418e5871.