Made the json output better.
Ajax helper stuff.