Removed unneeded code, fixed json parsing error