reverted some changes in NGraph and descendents to regain earlier speed