Updated AJAX public methods to prevent Template object from ruining the output.