Cleanup Part 1

Changes to Server and main loop..
Removed curve.h from some files.