CGI based Web App converted to Python Flask App