Optimized imports and remove unused variables.