issue #13

fixed the eof check logic in hasNext().  also made some internal
improvements/commenting.