Some logic shuffling, improved logging (now the critical messages are broadcast also to syslog), improved error condition checking, corrected few typos, other general improvements.