cleaning whitespace and unused variables