Add support for "pending" nodes
Clean up the pending entries nicely