Improve printing of node lists

Change-Id: If24a49e375be622890d0d98c17a8726d9c8bbb99