Rework the CGI module