Update JSON parsing structure to allow for nested matches. adds tests
Merging upstream master
refs #6