Correctly handle response chunks to avoid ‘SyntaxError: Unexpected token’
fix whitespace since CoffeeScript is sensitive to spacing