Clean up JSON parser a bit.
JSON parser improvements.

Some code cleanup and allowing spaces between tokens.