Minor edits in response to mailing list query

Added some System.out.println() calls to print info of interest, and
tidied up some mess in the code.