Added leave to the server. Fixed issues in join.
Made sure things compile.