Refine LOG statements, minor refactoring