Verify and Optimise CGI Output