Update state controller to return json