NO-154: Now prints to stdout without diagnostic messages.
NO-154: Preparing for conversion to cgi script.