Adding free memory function to WebServer, attempting to address memory leaks before they pop up