Remove uses of deprecated HashMap functions.