Some minor performance and maintainability improvements for the JSON parser.