A few comments added, print  messages reformatted, trivial lines removed.