cleaning logger bug, cleaning unused variables