Add a comment indicating direction that NodeValues iterates through. Remove an unused variable
Various fixes and added comments