Changed to json and some other things