clean up dead code and imports