added word removal in dict and fixed some bugs