Improve comments.
Add tests for JSON utility functions.