More tinkering

Separated cgi and js codes, still not working.
CGI plan scraped, only need html now.