removed dependency on simplejson
added tests