Again SQL statements have been replaced with functions from acct_mgr.model,
some other code corrections and simplifications done, quoting style changes
especially for log messages accompanied by a complete revision of Python doc
strings and code comments.