Replaced array_walk() with foreach().

Add a more detailed exception message when a top-level key is missing.

Fixed style in README.md.