Initial commit of JSON + matching improvement rewrite.