Fixed JSONization, output now passing HTML tests.