Refactoring server.py. Ignoring conf changes.