CA-135969: Disable verbose messages and log to syslog.

General code refactoring, getting rid of globals etc.