Removed old code
Moved server test code
Fixed a bug.