Cleaned up server.py and test cases