Simplify code by getting rid of noderefs
Make the code cleaner by using new_ixhash() helper function and other helpers from Util