closes issue 82, 67, and 39. Uses a template to generate straight json.