Moved server code to server folder