Implemented sort nodes_list by nesting/code