added server code, changed directory structure