Improved priority handling and cases where all child records are removed
Improved handling of flush() events (propagates through children and all events fire in order, regardless of hierarchy in node)