Added exeption handling around JSON parsing
Removed JSON parse from client