removes unused requires and dead code