closes issue 82, 67, and 39. Uses a template to generate straight json.
closes issues 66, 77, 93, and 94.