Added JSON and Survey code back