Added util.js and ran checks for assigning nodes