Fixed heredoc and sprintf, added adslashes, escapes