tweaked "today" line; code cleanup
new and updated nodes are sorted to preserve order