Thank you jshint.
Fix nesting probs.

Still figuring out how the JSON translates to XML and vice versa.