moved server related code into server directory
added extra tests