Remove unneeded keys.