remove unused imports, tweak logging