minor refactor and add code comments
complete node unit tests
add indexOf(nodeData) method and unit tests