JSON improvements and a bug fix. 

Just a couple of improvements to the JSON API as requested as well as a bugfix. Fixes #80 and #93.

:eyeglasses: @umbrae @JordanMilne