After cleaning up do_GET connection closure

I got rid of all of the extra if statements that were's needed after making the genering get_parameters in configfileio. I also made a function called closeAndSendHeader() that eliminates some repeated code.