Consider abstracting "all_keys" into a property, since you use it in more than one location. Not entirely necessary in this revision, but it looks useful for the future.