Cleaning up server.py and test cases