Modified updateLastNode functionality in App.js for node type is Constant index lookup