Cleanup some obfuscated code in next node handling.