Remove unnecessary entries.