cleanup dead code
fix logger