Big code cleanup.   Python logging instead of custom.