removed dead code and unused imports