Trying to get the python server to clean up nicely