Remove unused dictionary entries