Unused packages and variables are removed.