Deal with server code mess + some docs.