WIP: added a dirty flag to nodes so I can tell if it needs to be written to disk