Typos

I'm not entirely sure about the change from numpy.max() to the builtin max().  Also, I know that the default for dictionaries it to iter on keys, but there is no harm in being explicit.