changed initial appearance
added logic for reading responses from the cgi and 2 more functions for sending ajax