Fixed test, added template engine to produce json