cleaned up whitespace and unused variables