flag added and Seanixed a lot of JSON stuff
flag added and Seanixed a lot of JSON stuff