Update server.py

SpeedUp and improved stability