Adding main code for FTL CGI script.