fix order of subtree contents
fix excessive redrawing in edge cases
add debug style (add "debug" class to a parent to see which cells are being added)