Key length should now be determined correctly

The correct key lengths are now determined by the frequency table
added in the previous commit.