Clean up NodeEditor code a bit.