Added some convenience features; improved JSON.