JSON.parse all responses before sending + error handling and a little debugging, which should be removed if things work