Some minor fixes to produce lighter json

Hi,

Here's some modifications I made to make the returned json even lighter as it was one of my requirements.  Feel free to comment and merge if you think it's okay.